package Bean;

import java.util.List;

public class Page<T> {
    private static final Integer PAGE_SIZE=4;
    // 总共多少条记录
    private Integer Sum;
    //每组的大小
    private int numberSize;
    // 一共有多少组
    private int MaxSize;
    // 位置
    private int BeginIndex;
    private List<T> item;
    // 分页导航
    private String url;
    private String keyWord;
    private int CartAmount;

    public int getCartAmount() {
        return CartAmount;
    }

    public void setCartAmount(int cartAmount) {
        CartAmount = cartAmount;
    }

    public String getKeyWord() {
        return keyWord;
    }

    public void setKeyWord(String keyWord) {
        this.keyWord = keyWord;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public List<T> getItem() {
        return item;
    }

    public void setItem(List<T> item) {
        this.item = item;
    }

    public Integer getBeginIndex() {
        return BeginIndex;
    }

    public void setBeginIndex(int beginIndex) {
        BeginIndex = beginIndex;
    }

    public Page(){

    }
    public Page(int maxSize, int numberSize, Integer sum) {
        MaxSize = maxSize;
        this.numberSize = numberSize;
        Sum = sum;
    }


    public Integer getSum() {
        return Sum;
    }

    public void setSum(Integer sum) {
        Sum = sum;
    }

    public int getNumberSize() {
        return numberSize;
    }

    public void setNumberSize(int numberSize) {
        this.numberSize = numberSize;
    }

    public int getMaxSize() {
        return MaxSize;
    }

    public void setMaxSize(int maxSize) {
        MaxSize = maxSize;
    }

    @Override
    public String toString() {
        return "Page{" +
                "Sum=" + Sum +
                ", numberSize=" + numberSize +
                ", MaxSize=" + MaxSize +
                ", BeginIndex=" + BeginIndex +
                ", item=" + item +
                ", url='" + url + '\'' +
                '}';
    }
}
